﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace slTestingStreaming.Controls
{
    public partial class PictureSnap : UserControl
    {
        public PictureSnap()
        {
            InitializeComponent();


        }

        #region Source


        public ImageSource Source
        {
            get { return (ImageSource)GetValue(SourceProperty); }
            set { SetValue(SourceProperty, value); }
        }

        public static readonly DependencyProperty SourceProperty =
            DependencyProperty.Register("Source", typeof(ImageSource), typeof(PictureSnap), new PropertyMetadata(SourceChanged));

        private static void SourceChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args)
        {
            ((PictureSnap)obj).imgSnap.Source = (ImageSource)args.NewValue;
        }
        #endregion

    }
}
